package com.glx.learn_spring.learn_spring_05_di_set.service.impl;

import com.glx.learn_spring.learn_spring_05_di_set.dao.IBookDao;
import com.glx.learn_spring.learn_spring_05_di_set.dao.IUserDao;
import com.glx.learn_spring.learn_spring_05_di_set.service.IBookService;

/**
 * @author haoli
 * @create 2022/11/30 17:45
 */
public class BookServiceImpl implements IBookService {

    private IBookDao bookDao;
    private IUserDao userDao;

    @Override
    public void save() {
        System.out.println("bookService save ...");
        bookDao.save();
        userDao.save();
    }

    public void setBookDao(IBookDao bookDao) {
        this.bookDao = bookDao;
    }

    public void setUserDao(IUserDao userDao) {
        this.userDao = userDao;
    }
}
